"""
对于一个存在在数组，如何添加一个用0填充的边界?
"""
import numpy as np

arr1 = np.array([10, 34, 54, 23, 31, 87, 53, 68, 98, 49, 25, 11, 84, 32, 67, 88]).reshape(4, 4)
# np.pad()数组填充函数
arr2 = np.pad(arr1, ((1, 1), (1, 1)), mode='constant', constant_values=0)
print(arr2)
